﻿//========================================================= 
/**@file LoggerAdapterAppender.h
 * @brief 将日志数据适配输出到LoggerAdapter中
 * 
 * @date 2018-06-26   14:02:30
 * @author Zhyioo 
 * @version 1.0
 */ 
//--------------------------------------------------------- 
#ifndef _LIBZHOUYB_LOGGERADAPTERAPPENDER_H_
#define _LIBZHOUYB_LOGGERADAPTERAPPENDER_H_
//--------------------------------------------------------- 
#include "../ILogCat.h"

#include "../../ability/logger/FolderLogger.h"
using zhou_yb::extension::ability::FolderLogger;
//--------------------------------------------------------- 
namespace zhou_yb {
namespace extension {
namespace logcat {
//--------------------------------------------------------- 
/// 将日志数据输出到LoggerAdapter中
class LoggerAdapterAppender : public RefObject, public ILogAppender
{
public:
    LoggerAdapter Adapter;

    virtual void append(LogLevel lv, const char* tag, const char* str)
    {
        Adapter.WriteLine(str);
    }
};
//--------------------------------------------------------- 
} // namespace logcat
} // namespace extension
} // namespace zhou_yb
//--------------------------------------------------------- 
#endif // _LIBZHOUYB_LOGGERADAPTERAPPENDER_H_
//========================================================= 